Bound cuDF MPP memory across concat and exchange - #31
Open
thirtiseven wants to merge 1 commit into
Open
Conversation
Selective Build Plan
Selective build plan |
thirtiseven
marked this pull request as ready for review
July 30, 2026 09:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CudfBatchConcat, including pre-flush admission checks, row-and-byte grouping in the shared utility, and zero-copy passthrough for a single oversized input.Motivation
Large-scale MPP queries exposed unbounded GPU-memory behavior in batch concatenation, keyed final aggregation, and shuffle hash joins. The existing concat byte threshold was only a performance flush target and did not bound each actual
cudf::concatenatecall. Inactive MPP destinations could also retain payloads and state on the GPU until their consumers started.Design
batchConcatMaxBytesis a stability boundary independent of the existing performance target.CudfBatchConcatchecks the next input before admitting it, and the shared concatenate utility applies the same byte bound as a final defense. Other utility callers retain their existing behavior unless they pass an explicit byte limit. The default hard cap is 1 GiB.MPP host materialization retains uncompressed packed payloads in pageable host memory and uses a bounded reusable pinned buffer for D2H staging. This change does not add disk spill or host-payload compression.
Companion Spark-Gluten PR: https://github.com/NVIDIA/spark-gluten/pull/88
Validation
ConfigTest: 5/5 passedCudfBatchConcatTest: 14/14 passedAggregationTest: 3/3 passedUcxOutputQueueManagerTest: 21/21 passedlibgluten.soandmpp-substrait-runner: linked successfullyFull-scale keyed final aggregation without payload compression or disk spill requires reducing repeated intermediate state with bounded partition-local combine. This follow-up is tracked by NVIDIA/spark-gluten#86.